﻿package  {
	import flash.display.MovieClip;
	import flash.display.StageScaleMode;
	import flash.display.StageAlign;
	import actions.GetMoney;
	import flash.events.Event;
	import flow.InfoBg;
	import flash.events.MouseEvent;
	import flow.FlowInfo;
	
	public class CashFlow extends MovieClip {
		private function get info():FlowInfo { return _info; }
		private function get infoBg():InfoBg { return _infoBg; }
		
		public function CashFlow() {
			stage.scaleMode = StageScaleMode.NO_SCALE;
			stage.align = StageAlign.TOP_LEFT;
			
			this.addEventListener(Event.ADDED_TO_STAGE, this_addedToStage);
		}
		
		private function this_addedToStage(e:Event){
			this.infoBg.addEventListener("info-show", infoBg_show);
			this.infoBg.addEventListener("info-hide", infoBg_hide);
		}
		
		private function infoBg_show(e:Event){
			this.info.Show();
		}
		private function infoBg_hide(e:Event){
			this.info.Hide();
		}
	}
}
